//
//  CQSanBoxHandler.m
//
//  Created by chen on 14/11/19.
//  Copyright © 2014年 chen. All rights reserved.
//

#import "CQSanBoxHandler.h"

@implementation CQSanBoxHandler
+ (NSString *)pathOfCaches {
    NSString *path = [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingPathComponent:@"dataSource"];
    
    NSFileManager *manage = [NSFileManager defaultManager];
    [manage createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:nil];
    return path;
}
+ (NSString *)saveInCachesWithFileName:(NSString *)name {
    return [[CQSanBoxHandler pathOfCaches] stringByAppendingPathComponent:name];
}
@end
